SET IMPLICIT_TRANSACTIONS OFF
CREATE TABLE #No_PK ([Server] SYSNAME, [Database] SYSNAME, [Schema] SYSNAME, [Table] SYSNAME)
DECLARE @sql_command VARCHAR(8000)
SET @sql_command= 'USE [?]; IF DB_Name() NOT IN (''master'',''model'',''msdb'',''tempdb'',''dba'',''LiteSpeedLocal'') INSERT INTO #No_PK SELECT @@SERVERNAME, '

IF LEFT(@@VERSION,26) = 'Microsoft SQL Server  2000'
  SET @sql_command= @sql_command + 't.Table_Catalog, t.Table_Schema, t.Table_Name FROM INFORMATION_SCHEMA.TABLES t
		LEFT JOIN (SELECT DISTINCT Table_Schema, Table_Name FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE Constraint_Type IN (''UNIQUE'',''PRIMARY KEY'')) c ON (t.Table_Schema = c.Table_Schema AND t.Table_Name = c.Table_Name)
	  WHERE c.Table_Name IS Null ORDER BY t.Table_Schema, t.Table_Name'
ELSE
  SET @sql_command= @sql_command + 'DB_Name(), Schema_Name([schema_id]), [name] FROM sys.objects
	  WHERE type = ''U'' AND is_ms_shipped = 0
		AND object_id NOT IN (SELECT DISTINCT object_id FROM sys.indexes WHERE is_primary_key = 1 OR is_unique_constraint = 1)
	  ORDER BY Schema_Name([schema_id]),[name]'

EXEC sp_MSForEachDb @sql_command
SELECT * FROM #No_PK
DROP TABLE #No_PK
GO